home *** CD-ROM | disk | FTP | other *** search
- Path: tech.cftnet.com!not-for-mail
- From: wcowley@cftnet.com (Wes Cowley)
- Newsgroups: comp.lang.c++
- Subject: Re: Q: 1 bit data type?
- Date: 20 Feb 1996 10:31:09 GMT
- Organization: CFTnet
- Message-ID: <4gc7te$s7s@tech.cftnet.com>
- References: <4g69if$edt@golden.ncw.net>
- NNTP-Posting-Host: ppp244_4.cftnet.com
- X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
-
- Kit Arbuckle (arbuckle@ncw.net) wrote:
- : Does anyone know how to set up a data type that contains only one
- : bit in BC452? I am currently using chars, but that is an awful waste of
- : space to store a boolean value. I know I could use masking or shifting of
- : bits, but this would be simpler. Thanks in advance...
-
- Look up bit fields in your favorite C++ book:
-
- struct
- {
- int flag1 : 1
- int flag2 : 1
- // ...
- }
-
- Wes
-